'''
特殊的三角形

输入:9
输出:
        1
       121
      12321
     1234321
    123454321
   12345654321
  1234567654321
 123456787654321
12345678987654321
输入:C
输出:
  A
 ABA
ABCBA
'''

n = input()
if ord(n) < 65:
    n = int(n)
    for i in range(1, n + 1):
        space = ' ' * (n + 1 - i)
        frontpart = ''.join(map(str,list(range(1, i+1))))
        endpart = ''.join(map(str,list(range(i-1, 0, -1))))
        print(space + frontpart + endpart)
else:
    n = ord(n)
    for i in range(65, n + 1):
        space = ' ' * (n + 1 -i)
        frontpart = ''.join(map(chr,list(range(65, i+1))))
        endpart = ''.join(map(chr,list(range(i-1, 64, -1))))
        print(space + frontpart + endpart)